const express = require('express')
const router = express.Router()
const favoriteCtrl = require('../controller/favorite')
const favoriteValidator = require('../validator/favorite')

// 点击收藏或取消收藏
router.post('/favorite/:articleId', favoriteValidator.postFavorite, favoriteCtrl.postFavorite)
// 获取收藏列表
router.get('/favorites/:userId',favoriteValidator.getFavorites, favoriteCtrl.getFavorites)
module.exports = router
